package cn.doitedu.basic.server;

/**
 * 功能暴露出服务的演示
 *
 * 理解hive的元数据操作两种方式：
 *  直接继承元数据操作模块jar包并调用api，以实现元数据操作；
 *  将hive的元数据操作模块服务化，需求方通过网络请求该服务来实现元数据操作
 *
 */
public class MetaOper {
    private String a;
    private int b;
    public MetaOper(String a,int b){
        this.a = a;
        this.b = b;
    }

    public String getTableSchema(String tableName){

        return "[\n" +
                "{\n" +
                "\"field_index\":1,\n" +
                "\"field_name\":\"name\",\n" +
                "\"field_type\":\"string\"\n" +
                "},\n" +
                "{\n" +
                "\"field_index\":2,\n" +
                "\"field_name\":\"age\",\n" +
                "\"field_type\":\"int\"\n" +
                "},\n" +
                "{\n" +
                "\"field_index\":3,\n" +
                "\"field_name\":\"sex\",\n" +
                "\"field_type\":\"string\"\n" +
                "}\n" +
                "]";
    }

    public String getTablePartition(String tableName){

        return "partition infomation .......";
    }


}
